home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Developer Utilities / Installer 4.0.3 SDK / Script Examples / Font Compression Example / Makefile < prev    next >
Encoding:
Makefile  |  1994-11-15  |  5.0 KB  |  123 lines  |  [TEXT/MPS ]

  1. #
  2. #    makefile for "fontCompress.r", the example for InstaCompOne font compression
  3. #
  4. #
  5. #        to build installer script :
  6. #            1) select "Build" from "Build" menu
  7. #            2) type script name "fontCompress" ( note: ".r" is omitted )
  8. #            
  9. #        to build debug version of installer script :
  10. #            1) select "Build" from "Build" menu
  11. #            2) type script name "fontCompress.debug" ( note: ".r" is omitted )
  12. #            
  13. #
  14. #    mark young - 08/17/94
  15. #
  16.  
  17. # • script names
  18.  
  19. # the installer script name
  20. scriptName                = fontCompress
  21. # the debug version installer script name
  22. debugScriptName            = "{scriptName}.debug"
  23. # filename for ScriptCheck extension that will run when ScriptCheck does
  24. localScriptCheckExtName    = {scriptName}.scx
  25.  
  26.  
  27. # • support directory names
  28.  
  29. # directory where ScriptCheck MPW tool can be found
  30. ScriptCheckDir            = :::ScriptCheck 4.0.3:
  31. # directory where RIncludes can be found
  32. InstallerRIncDir        = :::DeveloperInterfaces:RIncludes:
  33. # directory where the Installer Debugger can be found
  34. InstallerDebuggerDir    = :::Installer Debugger 4.0:
  35. # directory where the InstaCompOne stuff can be found
  36. InstaCompOneDir            = :::InstaCompOne 1.0:
  37.  
  38. # • tool names
  39.  
  40. # InstaCompOne compression tool
  41. compressTool            = {InstaCompOneDir}InstaCompOneTool
  42.  
  43. # Splitting tool
  44. splitTool                = {InstaCompOneDir}FileAndRsrcSplitterTool
  45.  
  46. # Original ScriptCheck Extension
  47. ScriptCheckExtension    = {InstaCompOneDir}InstaCompOneSCExt.rsrc
  48.  
  49. # Fond Encoder tool
  50. fondTool                = {InstaCompOneDir}FondEncoderTool
  51.  
  52.  
  53.  
  54. # • simple font compression
  55.  
  56. # source file name
  57. CompressFontFileName            = Chicago
  58. # archive resulting from compression of source file
  59. CompressFontArchiveName            = :Disk 1:fontTome
  60.  
  61. # • split font compression
  62.  
  63. # source file name
  64. SplitFontFileName          =    Monaco
  65. # interim file resulting from splitting operation
  66. SplitFontTempName          =    splitFontObjectFile
  67. # archive resulting from compression of first split portion
  68. SplitFontArchive1          =    :Disk 1:splitFontTome1
  69. # archive resulting from compression of second split portion
  70. SplitFontArchive2          =    :Disk 2:splitFontTome2
  71.  
  72.  
  73. # make the debug version of finished installer script
  74. "{debugScriptName}" ƒ "{scriptName}"
  75.     # make a copy of the finished installer script and rename the copy
  76.     Duplicate -y "{scriptName}" "{scriptName} w/ Debugger"
  77.     # add the installer debugger resources to the copied installer script
  78.     Rez -m "{InstallerDebuggerDir}Installer Debugger.r" -append -o "{scriptName} w/ Debugger"
  79.  
  80. # make the standard version of finished installer script
  81. "{scriptName}" ƒƒ "{scriptName}.r" "{CompressFontArchiveName}" "{SplitFontArchive1}" "{SplitFontArchive2}" "{localScriptCheckExtName}"
  82.     # establish current date with time of NOON
  83.     set theTime    "'`date -d -s` 12:00:00 PM'"
  84.     # rez the installer source into the form that the installer can read
  85.     Rez "{scriptName}.r" -o "{scriptName}" -t 'kajr' -c 'kajr' -i "{InstallerRIncDir}"
  86.     # establish filename for finished installer script, set creation date and time, set attributes
  87.     SetFile -a b -d {theTime} "{scriptName}"
  88.     # run scriptcheck utility on the rezzed installer script
  89.     "{ScriptCheckDir}ScriptCheck" "{scriptName}" -h -d -a
  90.     # set modification date and time for finished installer script
  91.     SetFile -m {theTime} "{scriptName}"
  92.  
  93. # be sure that's there's a copy of the InstaCompOne ScriptCheck extension in current folder
  94. "{localScriptCheckExtName}" ƒ "{ScriptCheckExtension}"
  95.     # copy and rename the original scriptcheck extension
  96.     Duplicate -y "{ScriptCheckExtension}" "{localScriptCheckExtName}"
  97.  
  98. # do the simple font compression
  99. "{CompressFontArchiveName}" ƒ "{CompressFontFileName}"
  100.     # compress entire 'sfnt' resource into the font archive
  101.     "{compressTool}" "{CompressFontFileName}" -k sfnt=9217 -a part=128 -o "{CompressFontArchiveName}"
  102.     # compress entire 'NFNT' resource into the font archive
  103.     "{compressTool}" "{CompressFontFileName}" -k NFNT=1025 -a part=129 -o "{CompressFontArchiveName}"
  104.     # duplicates the FOND resource within "Chicago" and calls it 'iFND'
  105.     "{fondTool}" "{CompressFontFileName}" -o "{CompressFontArchiveName}"
  106.     
  107. # do the split font compression
  108. "{SplitFontArchive1}"  "{SplitFontArchive2}" ƒ "{SplitFontFileName}"
  109.     # split single 'sfnt' rsrc - largest piece=30K - put into 'sfnt' rsrc 200,201, etc. = place in interim file
  110.     "{splitTool}" "{SplitFontFileName}" -k sfnt=17127 -a sfnt=200 -s 30000 -o "{SplitFontTempName}"
  111.     # compress the first 'sfnt' part into first archive for split font
  112.     "{compressTool}" "{SplitFontTempName}" -k sfnt=200 -a part=200 -o "{SplitFontArchive1}" 
  113.     # compress the second 'sfnt' part into second archive ( for split font )
  114.     "{compressTool}" "{SplitFontTempName}" -k sfnt=201 -a part=201 -o "{SplitFontArchive2}"
  115.     # compress one of the two 'NFNT' rsrc's into first archive ( for split font )
  116.     "{compressTool}" "{SplitFontFileName}" -k NFNT=17774 -a part=300 -o "{SplitFontArchive1}" 
  117.     # compress the remaining 'NFNT' into first archive ( for split font )
  118.     "{compressTool}" "{SplitFontFileName}" -k NFNT=19242 -a part=301 -o "{SplitFontArchive1}"
  119.     # duplicates the FOND resource within "Monaco" and calls it 'iFND'
  120.     "{fondTool}" "{SplitFontFileName}" -o "{SplitFontArchive1}"
  121.  
  122.  
  123.